﻿using Iworld.Basis.Manager;
using Iworld.Basis.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Iworld.Game.Manager
{
    /// <summary>
    /// 游戏设置
    /// </summary>
    public class SettingOfGame : SettingBase
    {
        public SettingOfGame(IModelToDbContextOfBase db)
            : base(db)
        {

        }

        /// <summary>
        /// 每轮的局数,默认100局
        /// </summary>
        public int EachChapterRoundCount
        {
            get { return GetIntValue("EachChapterRoundCount", 100); }
            set { SetValue("EachChapterRoundCount", value); }
        }

        /// <summary>
        /// 每局游戏间隔时间(秒),默认40秒
        /// </summary>
        public int EachRoundTimeSpan
        {
            get { return GetIntValue("EachRoundTimeSpan", 40); }
            set { SetValue("EachRoundTimeSpan", value); }
        }

        /// <summary>
        /// 每轮游戏间隔时间(秒),默认2分钟
        /// </summary>
        public int EachChapterTimeSpan
        {
            get { return GetIntValue("EachChapterTimeSpan", 120); }
            set { SetValue("EachChapterTimeSpan", value); }
        }

        /// <summary>
        /// 限红分数
        /// </summary>
        public double LimitRedGolds
        {
            get { return GetDoubleValue("LimitRedGolds", -1); }
            set { SetValue("LimitRedGolds", value); }
        }

        /// <summary>
        /// 封单时间（秒）
        /// </summary>
        public int ClosureSingleTime
        {
            get { return GetIntValue("ClosureSingleTime", 3); }
            set { SetValue("ClosureSingleTime", value); }
        }

    }
}
